//封装具体的接口调用
import http from'@/utils/request.js'


export const sendCheckCode = (params) => {
	return http.get('/api/main/auth/sendCheckCode',params)
}
export const login = (params) => {
	return http.post('/api/main/auth/login',params)
}

export const getInfo = (params) => {
	return http.get('/api/main/index/indexData',params)
}
export const couponForGetList = (params) => {
	return http.get('/api/main/index/couponForGetList',params)
}
export const couponForGet = (params) => {
	return http.post('/api/main/index/couponForGet',params)
}
export const closeVipCardSendsms = (params) => {
	return http.get('/api/main/user/closeVipCardSendsms',params)
}
export const closeVipcard = (params) => {
	return http.post('/api/main/user/closeVipcard',params)
}

export const categorys = (params) => {
	return http.get('/api/main/index/categorys',params)
}
export const takeInLog = (params) => {
	return http.get('/api/main/user/takeInLog',params)
}

export const userCoupon = (params) => {
	return http.get('/api/main/user/coupon',params)
}

export const getUserInfo = (params) => {
	return http.get('/api/main/user/info',params)
}
export const vipcardRules = (params) => {
	return http.get('/api/main/user/vipcardRules',params)
}
export const takeIn = (params) => {
	return http.post('/api/main/user/takeIn',params)
}

export const infoUpdate = (params) => {
	return http.post('/api/main/user/infoUpdate',params)
}

export const userAddress = (params) => {
	return http.get('/api/main/user/address',params)
}

export const addressSave = (params) => {
	return http.post('/api/main/user/addressSave',params)
}

export const addressDelete = (params) => {
	return http.post('/api/main/user/addressDelete',params)
}
export const commodityList = (params) => {
	return http.get('/api/main/index/commodityList',params)
}

export const commodityDetail = (params) => {
	return http.get('/api/main/index/commodityDetail',params)
}


export const submitOrder = (params) => {
	return http.post('/api/main/index/order',params)
}

export const stores = (params) => {
	return http.post('/api/main/index/stores',params)
}


export const couponForGetUse = (params) => {
	return http.post('/api/main/index/couponForGetUse',params)
}
export const orderPay = (params) => {
	return http.post('/api/main/index/pay',params)
}
export const orderList = (params) => {
	return http.get('/api/main/index/orderList',params)
}
export const reptOrder = (params) => {
	return http.post('/api/main/index/reptOrder',params)
}
export const orderCancle = (params) => {
	return http.post('/api/main/index/orderCancle',params)
}
export const orderRefundApply = (params) => {
	return http.post('/api/main/index/orderRefundApply',params)
}

export const orderRefundCancle = (params) => {
	return http.post('/api/main/index/orderRefundCancle',params)
}
export const getQrCode = (params) => {
	return http.post('/api/main/index/qrCode',params)
}


export const inviteLog = (params) => {
	return http.get('/api/main/index/inviteLog',params)
}